<div class="box box-primary">
    <div class="box-header with-border">
        <div class="box-title">
            <button type="submit" class="btn btn-primary" (click)="toggleModal('add')">新增</button>
            <button type="submit" class="btn btn-primary" (click)="toggleDRModalOpen()">导入</button>
        </div>
    </div>
    <div class="box box-body table-responsive">
        <!-- 查询条件 -->
        <form class="form-inline">
            <div class="form-group ext-from-item">
                <label for="">基金代码：</label>
                <input type="text" class="form-control" id="fundcodeS" name="fundcodeS" [(ngModel)]="searchBody.vcFundCode" placeholder="基金代码">
            </div>
            <div class="form-group ext-from-item">
                <label for="">基金名称：</label>
                <input type="text" class="form-control" id="fundname" name="fundname" [(ngModel)]="searchBody.vcFundName" placeholder="基金名称">
            </div>
            <div class="form-group ext-from-item">
                <button type="submit" class="btn btn-primary" (click)="getIPOInfo()">查询</button>
                <button type="submit" class="btn btn-warning" (click)="resetSearch()">重置</button>
            </div>
        </form>
        <!-- 查询条件 END-->
        <!-- 列表-->
        <div class="table-scroll-content">
            <table class="table table-bordered table-keep-line table-hover table-striped pull-right align-center">
                <tr>
                    <th>基金代码</th>
                    <th>基金名称</th>
                    <th>是否可参与询价</th>
                    <th>编辑</th>
                </tr>
                <tr *ngFor="let iPOInfo of iPOInfoList">
                    <td>{{iPOInfo.fundcode}}</td>
                    <td>{{iPOInfo.fundname}}</td>
                    <td>{{iPOInfo.isnewipo == '1'? '是' : '否'}}</td>
                    <td>
                        <button type="submit" class="btn btn-primary btn-sm" (click)="toggleModal('update',iPOInfo)">修改</button>
                        <button type="submit" class="btn btn-warning btn-sm" (click)="deleteIPOInfo(iPOInfo)">删除</button>
                    </td>
                </tr>
            </table>
        </div>
        <!-- 列表 END-->
        <!-- 分页 Begin -->
        <app-pagination
            [currentPageNum]="pageInfo.currentPageNum"
            [pagesShow]="pageInfo.pagesShow"
            [totalPages]="pageInfo.totalPages"
            (pageChanged)="pageNavigation($event)">
            <div class="pull-left pagination-detail" data-pagination-additional="true">
                <span class="pagination-info">
                    当前显示第{{pageInfo.startRow}}到第{{pageInfo.endRow}}条&nbsp;&nbsp;&nbsp;&nbsp;总共{{pageInfo.total}}条
                </span>
                <span class="page-list">
                    <span class="btn-group dropup">
                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                            <span class="page-size">{{pageInfo.pageSize}}</span>
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu" role="menu">
                            <li *ngFor="let i of pageInfo.pageList" role="menuitem"
                                [class.active]="pageInfo.pageSize === i"
                                (click)="pageSizeChange(i)">
                            <a href="javascript:void(0)">{{i}}</a>
                            </li>
                        </ul>
                    </span> 
                    条记录每一页
                </span>
            </div>
        </app-pagination>
        <!-- 分页 End -->
    </div>
</div>
<!-- 新增打新信息 Begin -->
<div class="modal fade" id="dxModal" tabindex="-1" role="dialog" aria-labelledby="新增">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 *ngIf="type == 'add'" class="modal-title">新增是否参与询价信息</h4>
                <h4 *ngIf="type == 'update'" class="modal-title">修改是否参与询价信息</h4>
            </div>
            <div class="modal-body">
                <form class="form-inline">
                    <div class="form-group ext-from-item">
                        <label for="fundcode">基金代码：</label>
                        <input type="text" class="form-control" name="fundcode" id="fundcode" placeholder="基金代码" [(ngModel)]="iPOInfo.fundcode">
                    </div>
                    <div class="form-group ext-from-item">
                        <label for="fundname">基金名称：</label>
                        <input type="text" class="form-control" name="fundname" id="fundname" placeholder="基金名称" [(ngModel)]="iPOInfo.fundname">
                    </div>
                    <div class="form-group ext-from-item">
                        <label for="isnewipo">是否可参与询价：</label>
                        <select class="form-control" name="isnewipo" [(ngModel)]="iPOInfo.isnewipo">
                            <option [value]="1" selected="true">是</option>
                            <option [value]="0">否</option>
                        </select>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button *ngIf="type=='add'" type="button" class="btn btn-primary" (click)="addOrUpateIPOInfo(iPOInfo)">新增</button>
                <button *ngIf="type=='update'" type="button" class="btn btn-primary" (click)="addOrUpateIPOInfo(iPOInfo)">修改</button>
                <button type="button" class="btn btn-default" data-dismiss="modal" (click)="closeDxModal()">关闭</button>
            </div>
        </div>
    </div>
</div>
<!-- 新增打新信息 End -->
<!-- 导入 Begin-->
<new-stock-purchase-file-upload-normal [modalConfig]="fileUploadModal" (close)="reflesh($event)"></new-stock-purchase-file-upload-normal>
<!-- 导入 End -->
